----一些公共方法
--#include "data\config\common\CommonItemOpConfig.lua" once			--通用物品操作


function CommonRecycleByIdx( sysarg, recycleIdx, delLogId, delLogStr, addLogId, addLogStr, sendMsg )
	--print("CommonTeleportByTeleTypeAndId, teleType="..teleType..", teleId="..teleId)
	local recycleCfg = CommonRecycleCfg[recycleIdx]
	if recycleCfg then
		if not recycleCfg.isUse then
			Actor.sendTipmsg(sysarg, Lang.ScriptTips.COM0079, ttFlyTip)
			return false
		end

		if not recycleCfg.delItems then
			return false
		end

		if not recycleCfg.addItems then
			return false
		end

		if not IsBagGridEnough( sysarg, recycleCfg.addItems ) then
			Actor.sendTipmsg(sysarg, Lang.ScriptTips.COM0015, ttFlyTip)
			return false
		end

		if not CheckConsumeCond( sysarg, recycleCfg.delItems, 1, sendMsg ) then
			return false
		end

		if not DoConsumeCond( sysarg, recycleCfg.delItems, 1, delLogId, delLogStr, sendMsg  ) then
			return false
		end

		GiveCommonAward( sysarg, recycleCfg.addItems, addLogId, addLogStr )
		return true
	end
	return false
end

